<?php

namespace Database\Factories;

use App\Models\Product;
use App\Models\StoreSeckill;
use Illuminate\Database\Eloquent\Factories\Factory;

class StoreSeckillFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = StoreSeckill::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'product_id' => $this->faker->numberBetween(1, 5),
            'recommend_image' =>$this->faker->imageUrl(),
            'rotation_chart' =>['http://placeimg.com/400/400/any','http://placeimg.com/400/400/any','http://placeimg.com/400/400/any'],
            'title' => $this->faker->text(20),
            'introduction' => $this->faker->text(40),
            'price' => $this->faker->randomFloat(2, 0, 50),
            'cost' => $this->faker->randomFloat(2, 50, 100),
            'original_price' => $this->faker->randomFloat(2, 100, 150),
            'give_integral' => $this->faker->randomFloat(2, 100, 150),
            'sort' => $this->faker->numberBetween(0, 100),
            'stock' => $this->faker->numberBetween(50, 200),
            'sales' => $this->faker->numberBetween(50, 200),
            'unit_name' => $this->faker->text(10),
            'postage' => $this->faker->randomFloat(2, 0, 30),
            'description' => $this->faker->text(40),
            'start_time' =>  date('Y-m-d H:i:s',$this->faker->numberBetween(1500000000, 1601000000)),
            'stop_time' => date('Y-m-d H:i:s',$this->faker->numberBetween(1601000000, time())),
            'num' =>  $this->faker->numberBetween(1, 20),
            'time_id' => $this->faker->numberBetween(1, 20),
            'once_num' => $this->faker->numberBetween(1, 20),
            'temp_id' => $this->faker->numberBetween(1, 10),
            'weight' => $this->faker->numberBetween(20, 200),
            'volume' => $this->faker->numberBetween(20, 200),
            'quota' => $this->faker->numberBetween(10, 20),
            'is_show' => $this->faker->numberBetween(0, 1),
            'quota_show' => $this->faker->numberBetween(0, 1),
            'is_postage' => $this->faker->numberBetween(0, 1),
            'is_hot' => $this->faker->numberBetween(0, 1),
        ];
    }
}
